package org.bluewhale.hibernate.dao;

import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Iterator;

/**
 * AbstractSkUser entity provides the base persistence definition of the SkUser
 * entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public abstract class AbstractSkUser implements java.io.Serializable {

	// Fields

	private Integer id;
	private String userId;
	private String userName;
	private String school;
	private String birthday;
	private Set skUserRecommandsForDstUserId = new HashSet(0);
	private Set skShukuRecommands = new HashSet(0);
	private Set skTags = new HashSet(0);
	private Set skUserBooks = new HashSet(0);
	private Set skFriendsForUserId2 = new HashSet(0);
	private Set skFriendsForUserId1 = new HashSet(0);
	private Set skUserRecommandsForSrcUserId = new HashSet(0);

	// Constructors

	/** default constructor */
	public AbstractSkUser() {
	}

	/** minimal constructor */
	public AbstractSkUser(String userId, String userName, String school,
			String birthday) {
		this.userId = userId;
		this.userName = userName;
		this.school = school;
		this.birthday = birthday;
	}

	/** full constructor */
	public AbstractSkUser(String userId, String userName, String school,
			String birthday, Set skUserRecommandsForDstUserId,
			Set skShukuRecommands, Set skTags, Set skUserBooks,
			Set skFriendsForUserId2, Set skFriendsForUserId1,
			Set skUserRecommandsForSrcUserId) {
		this.userId = userId;
		this.userName = userName;
		this.school = school;
		this.birthday = birthday;
		this.skUserRecommandsForDstUserId = skUserRecommandsForDstUserId;
		this.skShukuRecommands = skShukuRecommands;
		this.skTags = skTags;
		this.skUserBooks = skUserBooks;
		this.skFriendsForUserId2 = skFriendsForUserId2;
		this.skFriendsForUserId1 = skFriendsForUserId1;
		this.skUserRecommandsForSrcUserId = skUserRecommandsForSrcUserId;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getSchool() {
		return this.school;
	}

	public void setSchool(String school) {
		this.school = school;
	}

	public String getBirthday() {
		return this.birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public Set getSkUserRecommandsForDstUserId() {
		return this.skUserRecommandsForDstUserId;
	}

	public void setSkUserRecommandsForDstUserId(Set skUserRecommandsForDstUserId) {
		this.skUserRecommandsForDstUserId = skUserRecommandsForDstUserId;
	}

	public Set getSkShukuRecommands() {
		return this.skShukuRecommands;
	}

	public void setSkShukuRecommands(Set skShukuRecommands) {
		this.skShukuRecommands = skShukuRecommands;
	}

	public Set getSkTags() {
		/*List list = new ArrayList();
		Iterator iter = this.skTags.iterator();
		while (iter.hasNext()) 
			list.add(iter.next());
		
		Collections.sort(list, new Comparator (){
			public int compare(Object o1, Object o2) {
				return ((SkTag)o1).getId() - ((SkTag)o2).getId();
			}
		}); 
		return list;*/
		return this.skTags;
	}

	public void setSkTags(Set skTags) {
		this.skTags = skTags;
	}

	public Set getSkUserBooks() {
		/*List list = new ArrayList();
		Iterator iter = this.skUserBooks.iterator();
		while (iter.hasNext()) 
			list.add(iter.next());
		
		Collections.sort(list, new Comparator (){
			public int compare(Object o1, Object o2) {
				return ((SkUserBook)o1).getId() - ((SkUserBook)o2).getId();
			}
		}); 
		return list;*/
		return this.skUserBooks;
	}

	public void setSkUserBooks(Set skUserBooks) {
		this.skUserBooks = skUserBooks;
	}

	public Set getSkFriendsForUserId2() {
		return this.skFriendsForUserId2;
	}

	public void setSkFriendsForUserId2(Set skFriendsForUserId2) {
		this.skFriendsForUserId2 = skFriendsForUserId2;
	}

	public Set getSkFriendsForUserId1() {
		return this.skFriendsForUserId1;
	}

	public void setSkFriendsForUserId1(Set skFriendsForUserId1) {
		this.skFriendsForUserId1 = skFriendsForUserId1;
	}

	public Set getSkUserRecommandsForSrcUserId() {
		return this.skUserRecommandsForSrcUserId;
	}

	public void setSkUserRecommandsForSrcUserId(Set skUserRecommandsForSrcUserId) {
		this.skUserRecommandsForSrcUserId = skUserRecommandsForSrcUserId;
	}

}